#include <iostream>
#include <memory>
#include <string>
#include <thread>
#include <grpcpp/grpcpp.h>
#include "../protos/FusionData.grpc.pb.h"
#include "../atomic_include/FusionData.h"


void getFusionData_func(FusionInput* request, FusionOutput* reply);



class FusionData_Service_ServerImpl final : public ::FusionData_Package::FusionData_Service::Service {
public:
    FusionData_Service_ServerImpl() {} 
    

    ::grpc::Status getFusionData(::grpc::ServerContext* context, 
            const ::FusionData_Package::FusionInput* request, 
                ::FusionData_Package::FusionOutput* reply) override {

        FusionInput FusionData_Request_t;
        FusionOutput FusionData_Reply_t;

        
        
        FusionData_Request_t.camera_id = request->camera_id();
        
        
        
        FusionData_Request_t.robot_id = request->robot_id();
        
        

        /******************************************************************/
        getFusionData_func(&FusionData_Request_t, &FusionData_Reply_t);

        /******************************************************************/

        reply->Clear(); // clear reply message
        
        
        reply->set_number1(FusionData_Reply_t.number1);
        
        
        
        reply->set_number2(FusionData_Reply_t.number2);
        
        
        
        reply->set_return_type(FusionData_Reply_t.return_type);
        
        
        std::cout << "This is Method = getFusionData,   ServiceName = FusionData_Service" << std::endl;
        return grpc::Status::OK;
    }

    
};